package router

import (
	"github.com/gin-gonic/gin"
	"oidc/router/api"
)

func Router() {
	r := gin.Default()
	//注册client，参数是name和url，name必须是LOS1,LOS2,或者LOS3
	r.GET("/los/auth/register_client", api.RegisterClient())

	r.GET("/los/auth/code", api.ReturnCode())
	r.POST("/los/auth/token", api.ReturnAccToken())

	r.POST("/los/auth/endpoint", api.IfTokenTimeOut(), api.QueryEndPoint())

	r.Run(":8080")
}
